package cn.shiva.controller;

import cn.shiva.dto.QueryDTO;
import com.alibaba.fastjson.JSONObject;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * @author shiva   2021/10/15 21:19
 */
@RestController
@RequestMapping(value = "stream")
public class StreamController {

    @PostMapping(value = "errorDemo")
    public String errorDemo(@RequestBody QueryDTO queryDTO, HttpServletRequest request) {
        return JSONObject.toJSONString(queryDTO);
    }

    @PostMapping(value = "wapperDemo")
    public String wapperDemo(@RequestBody QueryDTO queryDTO, HttpServletRequest request) {
        return JSONObject.toJSONString(queryDTO);
    }

}
